import request from '@/utils/request'

export function getData(query) {
  return request({
    url: '/querystats/getdata',
    method: 'get',
    params: query
  })
}
export function testapi(query) {
  return request({
    url: 'user/pageQuare',
    method: 'post',
    data: {
      'limit': 10,
      'page': 1
    }
  })
}
export function getPermission(query) {
  return request({
    url: '/querystats/getPermission',
    method: 'get',
    params: query
  })
}

/**
 * 评价记录分页查询
 * @param query
 */
export function pageQuare(query) {
  return request({
    url: '/evaluation/pageQuare',
    method: 'post',
    data: query
  })
}
/**
 * 按照机构统计
 * @param query
 */
export function statisticsByOrg(query) {
  return request({
    url: '/evaluation/statisticsByOrg',
    method: 'post',
    data: query
  })
}
/**
 * 按照大厅统计
 * @param query
 */
export function statisticsByHall(query) {
  return request({
    url: '/evaluation/statisticsByHall',
    method: 'post',
    data: query
  })
}
/**
 * 按照窗口统计
 * @param query
 */
export function statisticsByWindow(query) {
  return request({
    url: '/evaluation/statisticsByWindow',
    method: 'post',
    data: query
  })
}
/**
 * 按照人员统计
 * @param query
 */
export function statisticsByUser(query) {
  return request({
    url: '/evaluation/statisticsByUser',
    method: 'post',
    data: query
  })
}
/**
 * 意见调查统计
 * @param query
 */
export function questionStatistics(query) {
  return request({
    url: '/question/statistics',
    method: 'post',
    data: query
  })
}
// 问题答案选项统计，扇形统计图
export function answerCountByQid(query) {
  return request({
    url: '/testPaper/answerCountByQid',
    method: 'post',
    data: query
  })
}
